<div [hidden]="!opened">
  <div class="modal">
    <div class="modal-dialog modal-xl" role="dialog" aria-hidden="true">
      <div class="modal-content">
        <h3 class="modal-header">创建脚本</h3>
        <div class="modal-body">
          <form clrForm #scriptForm='ngForm'>
            <clr-input-container>
              <label>名称</label>
              <input type="text" [(ngModel)]="item.name" name="name" clrInput required>
            </clr-input-container>

            <clr-select-container>
              <label>类型</label>
              <select [(ngModel)]="item.type" (change)="onTypeChange()" name="type" clrSelect required>
                <option value="shell">Shell</option>
                <option value="python">Python</option>
                <option value="other">其他</option>
              </select>
            </clr-select-container>
            <div>
            </div>

            <div style="margin-top: 18px">
              <textarea #coder></textarea>
            </div>

          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn" (click)="onSubmit()" [disabled]="scriptForm.invalid">保存</button>
          <button type="button" class="btn" (click)="onCancel()">取消</button>
        </div>
      </div>
    </div>
  </div>
  <div class="modal-backdrop" aria-hidden="true"></div>
</div>

